package icom.icss.service;

import icom.icss.entity.PageBean;
import icom.icss.entity.User;

import java.sql.SQLException;

public interface UserService {
    /**
     *
     * @param username
     * @throws SQLException
     */
    void DeleteAlluser(String username) throws SQLException;


    /**
     *
     * @param username
     * @throws SQLException
     */
    void DeleteByname(String username) throws SQLException;


    /**
     *
     * @param username
     * @param password
     * @return
     * @throws SQLException
     */
    User login(String username,String password) throws SQLException;

    /**
     *
     * @param username
     * @return
     * @throws SQLException
     */
    boolean checkUsername(String username) throws SQLException;

    /**
     *
     * @param user
     * @throws SQLException
     */
    void updateUser(User user) throws SQLException;

    /**
     *
     * @param username
     * @return
     * @throws SQLException
     */
    User selectUsername(String username) throws SQLException;

    /**
     *
     * @param currentPage
     * @param count
     * @return
     * @throws SQLException
     */
    PageBean selectPageBean(int currentPage, int count) throws SQLException;
}
